import { ApiVersoin } from '@/common/enums/httpEnum'

const Url = {
  bringActScene: `${ApiVersoin.V11}/oin-activity/get-scene`,
  bringActConfig: `${ApiVersoin.V11}/oin-activity/get-activity-info`,
  bringActRule: `${ApiVersoin.V11}/oin-activity/get-rule`,
  bringActQualification: `${ApiVersoin.V11}/old-introduce-new/check-ticket`,
  bringActInviteId: `${ApiVersoin.V11}/old-introduce-new/gen-invitation`,
  bringActPoster: `${ApiVersoin.V11}/old-introduce-new/get-poster-info`,
  bringActhareInfo: `${ApiVersoin.V11}/oin-activity/get-activity-share-info`,
  bringActhareJoined: `${ApiVersoin.V11}/oin-activity/submit-bind`,
}

export const getBringActivityScene = (params) => uni.$uv.http.get(Url.bringActScene, { params })
export const getBringActivityConfig = (params) => uni.$uv.http.get(Url.bringActConfig, { params })
export const getBringActivityRule = (params) => uni.$uv.http.get(Url.bringActRule, { params })
export const verifyBringActivityQualification = (params) => uni.$uv.http.get(Url.bringActQualification, { params })
export const getBringActivityInviteId = (params) => uni.$uv.http.get(Url.bringActInviteId, { params })
export const getBringActivityPoster = (params) => uni.$uv.http.get(Url.bringActPoster, { params })
export const getBringActivityInfo = (params) => uni.$uv.http.get(Url.bringActhareInfo, { params })
export const joinBringActivity = (params) => uni.$uv.http.post(Url.bringActhareJoined, params, { showLoading: true })
